
public class Homework_605_6 {
	public static void main(String[] args) {
		// 输出1-10000以内所有的质数并统计个数
		int a[] = new int[10000];
		boolean isNum;
		int count = 0;
		for (int i = 1; i <= 10000; i++) {
			isNum = true;
			for (int j = 2; j * j <= i; j++) {
				if (i % j == 0) {
					isNum = false;
					break;
				}
			}
			if (isNum) {
				count++;
				System.out.println(i);
			}
		}
		System.out.println(count);
	}
}
